#include "gui/objects/hud/GUISpeedometerHand.h"

namespace gui {

GUISpeedometerHand::GUISpeedometerHand(GUIObjectDrawer* drawer, int carSpeed, int maxCarSpeed) :
GUIObject(drawer, "res/img/speedometer-hand.bmp", BLUE){
	double handAngleOffset = 5 * PI / 4;
	double totalAngleRange = 6 * PI / 4;
	double handAngle = handAngleOffset + carSpeed * totalAngleRange / maxCarSpeed;
	this->setRotation(handAngle);
	// TODO parametrizar.
	this->setCenter(75, 465);
}

GUISpeedometerHand::~GUISpeedometerHand() {

}

}
